import"./aWDZHnvL3RQbKF.js";import{D as e,E as t,Ht as n,On as r,Yt as i,_ as a,b as o,bt as s,g as c,k as l,mt as u,o as d,qt as f,tr as p,vn as m,y as h}from"./CIxmKYxc4tZcJF.js";import{b as g}from"./DWlEJV-j33On0I.js";import{o as _}from"./DcwiUW8R1GKRvl.js";import{t as v}from"./DJeJfhW-4iv1Az.js";import{a as y,s as b,u as x}from"./BbxvatETxeTHf.js";import"./C3Xax3Tz4BagVD.js";import{n as S}from"./B-Bvl4N43PCqeg.js";var C=[`value`],w=[`value`],T=[`value`],E={value:!0},D={value:!1},O=l({__name:`app-settings-financial`,setup(l){let O=b(),k=c(()=>[[1,`month`],[3,`quarter`],[4,`tertial`],[6,`semester`]]),A=m(``);return n(()=>O?.value?.sCountry,e=>{if(e){let t=x[e];A.value=t?.tax?.map(e=>`${e}%`).join(`, `)??``,O&&(O.value.sTaxRates=Object.fromEntries(t?.tax?.map(e=>[String(e),{rate:e}])??[]),O.value.sCurrency=t?.currency??`EUR`,O.value.sFinancialYearDay=t?.fiscal?.day??1,O.value.sFinancialYearMonth=t?.fiscal?.month??1)}}),(n,c)=>(u(),o(d,null,[a(`h3`,null,p(n.$t(`settings.financial.title`)),1),r(O)?(u(),o(d,{key:0},[e(r(S),{modelValue:r(O).sCountry,"onUpdate:modelValue":c[0]||=e=>r(O).sCountry=e,title:n.$t(`settings.financial.country`),class:`full`,disabled:``},null,8,[`modelValue`,`title`]),e(r(_),{modelValue:r(O).sCurrency,"onUpdate:modelValue":c[1]||=e=>r(O).sCurrency=e,title:n.$t(`settings.financial.currency`),disabled:``},null,8,[`modelValue`,`title`]),e(r(v),{title:n.$t(`settings.financial.taxes`)},{default:f(()=>[a(`div`,null,[a(`b`,null,p(A.value||r(y)(`settings.financial.noTaxRate`)),1)]),a(`p`,null,p(n.$t(`settings.financial.taxesDesc`)),1)]),_:1},8,[`title`]),e(r(v),{title:n.$t(`settings.financial.year`)},{default:f(()=>[a(`div`,null,[i(a(`select`,{"onUpdate:modelValue":c[2]||=e=>r(O).sFinancialYearMonth=e,class:`oui-select`},[(u(),o(d,null,s([1,2,3,4,5,6,7,8,9,10,11,12],e=>a(`option`,{key:e,value:e},p(e),9,C)),64))],512),[[g,r(O).sFinancialYearMonth]]),c[6]||=t(` (month) \xA0 `,-1),i(a(`select`,{"onUpdate:modelValue":c[3]||=e=>r(O).sFinancialYearDay=e,class:`oui-select`},[(u(),o(d,null,s([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],e=>a(`option`,{key:e,value:e},p(e),9,w)),64))],512),[[g,r(O).sFinancialYearDay]]),c[7]||=t(` (day) `,-1)]),a(`p`,null,p(n.$t(`settings.financial.yearDescription`)),1)]),_:1},8,[`title`]),e(r(v),{title:n.$t(`settings.financial.period`)},{default:f(()=>[i(a(`select`,{"onUpdate:modelValue":c[4]||=e=>r(O).sJournalViewPerYear=e,class:`oui-select`},[(u(!0),o(d,null,s(k.value,e=>(u(),o(`option`,{key:e[0],value:e[0]},p(n.$t(`settings.financial.periodOption.${e[1]}`)),9,T))),128))],512),[[g,r(O).sJournalViewPerYear]]),a(`p`,null,p(n.$t(`settings.financial.periodDescription`)),1)]),_:1},8,[`title`]),e(r(v),{title:n.$t(`settings.financial.relevantDate`)},{default:f(()=>[i(a(`select`,{"onUpdate:modelValue":c[5]||=e=>r(O).sPaymentDateSignificant=e,class:`oui-select`},[a(`option`,E,p(n.$t(`settings.financial.relevantDateIst`)),1),a(`option`,D,p(n.$t(`settings.financial.relevantDateSoll`)),1)],512),[[g,r(O).sPaymentDateSignificant]]),a(`p`,null,p(n.$t(`settings.financial.relevantDateDescription`)),1)]),_:1},8,[`title`])],64)):h(``,!0)],64))}});export{O as default};